package com.pactera.madp.cp.controller.sidebar.marketing;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pactera.madp.common.core.util.R;
import com.pactera.madp.cp.service.MarketingLinkService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (McMarketingLink)表控制层
 *
 * @author yushen.qi
 * @since 2021-05-24 18:26:01
 */
@RestController
@RequestMapping("/marketinglinkwechat")
@Api(value = "marketingLink", tags = "营销素材-链接管理侧边栏")
public class MarketingLinkSidebarController {

    /**
     * 服务对象
     */
    @Resource
    private MarketingLinkService marketingLinkService;

    /**
     * 模糊查询
     *
     * @param title
     * @param classification
     * @return
     */
    @GetMapping("/page")
    @ApiOperation(value = "名称模糊查询或分页查询")
    public R qryPage(Page page,String title, Integer classification) {
        return R.ok(marketingLinkService.selectAllByPageOrName(page,title,classification));
    }

}
